import UIKit
//https://blog.csdn.net/qfeung/article/details/136949964
//https://blog.csdn.net/qq_36487644/article/details/82316319
var arr1: [String] = ["主表item1", "主表Item 2"]
var arr2: [String] = [] // 可能为空
var arr3: [String] = ["农副产品Item 1", "农副产品item 2"] // 可能为空

let t = [""] +
(!arr2.isEmpty ? ["银行账户信息"] : [""]) +
(!arr3.isEmpty ? ["农副产品信息"] : [""])

let res = t.enumerated().filter { 
  $0.offset != 0
  
}
print(res)

let a = [0,1,0,3]
let b = a.enumerated().filter { (idx,item) in
  !(idx != 0 && item == 0)
}.map { $0.element}
print(b)

